package com.pactera.madp.cp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pactera.madp.cp.api.dto.contact.ContactByTagDto;
import com.pactera.madp.cp.api.entity.WorkContactEntity;
import com.pactera.madp.cp.api.model.workcontact.ContactData;
import com.pactera.madp.cp.api.model.workcontact.GetContactRequest;
import com.pactera.madp.cp.api.vo.ManagerViewCustomerVO;
import com.pactera.madp.cp.api.vo.contact.ContactPageVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface ContactMapper extends BaseMapper<WorkContactEntity> {

    List<ContactData> getEmployeeContact(@Param("parem") GetContactRequest parem, @Param("empIds") String [] empIds);

    List<ContactByTagDto> getContactByEmployee (@Param(value = "corpId") Integer corpId, @Param(value = "tagIds") List<Integer> tagIds, @Param("employeeName") String employeeName);

    List<ContactByTagDto> getContactByEmployees (@Param(value = "corpId") Integer corpId, @Param(value = "tagIds") List<Integer> tagIds, @Param("employeeNames") List<String> employeeNames);

    List<Map> getTagByContact( @Param(value = "contactId") Integer contactId, @Param("employeeId") Integer employeeId,@Param(value = "corpId") Integer corpId);

    Integer countByEmployeeIds(@Param("employeeIds") Set<Integer> employeeIds, @Param("corpId") Integer corpId, @Param("today") String today);

    List<ContactPageVO> getWorkContactsByDeptId(@Param("deptId") Integer deptId);

    List<ManagerViewCustomerVO> getManagerViewCustomerVOListByWxUserId(@Param(value = "corpId") Integer corpId, @Param(value = "wxUserId") String wxUserId, @Param(value = "searchStr") String searchStr);

    List<Map<String, String>> getMobileAndWxExternalUseridByWxUserId(@Param("wxUserId") String wxUserId);

}
